import com.jian.java.bean.User;
import com.jian.java.inter.UserConsumer;
import com.jian.java.inter.UserService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

/**
 * @author Jiange
 * @create 2021-05-23-14:10
 */
public class MyApplication {
    public static void main(String[] args) throws IOException {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("Consumer.xml");

        UserConsumer bean = context.getBean(UserConsumer.class);
        String name = bean.getName(new User("李子建", 18));
        System.out.println("name = " + name);
        System.in.read();
    }
}
